import request from '@/utils/request';
import { R } from '../model/R';
import { WorksMark } from '@/api/model/WorksMark';

// 新增作品打分
export function addWorksMark(data: any) {
    return request({
        url: '/business/worksMark',
        method: 'post',
        data: data
    });
}

// 修改作品打分
export function editWorksMark(data: any) {
    return request({
        url: '/business/worksMark',
        method: 'put',
        data: data
    });
}

// 初始化点评内容
export function initWorksMark(worksId: number | string) {
    return request({
        url: '/business/worksMark/init/' + worksId,
        method: 'get'
    });
}

// 获取作品点评列表
export function listWorksMark(query: any):Promise<R<WorksMark>> {
    // eslint-disable-next-line @typescript-eslint/ban-ts-comment
    // @ts-ignore
    return request({
        url: `/business/worksMark/list`,
        method: 'get',
        params: query
    });
}



